<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>单页面模板</title>
<meta name="description" content="" />
<meta name="author" content="Jiapeng Cai" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="plugin/_js/html5shiv.js"></script>
<script src="plugin/_js/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="/res/css/loading.css" />
<link rel="stylesheet" href="/plugins/layui/css/layui.css" />
<link rel="stylesheet" href="/plugins/iconfont/iconfont.css" />
<link rel="stylesheet" href="/res/css/main.css" />
<style>
#cnzz_stat_icon_1273734385{display: none}
</style>
</head>
<body class="layui-layout-body ">
	<div class="loading-layout">
		<div class="spinner">
		  <div class="rect1"></div>
		  <div class="rect2"></div>
		  <div class="rect3"></div>
		  <div class="rect4"></div>
		  <div class="rect5"></div>
		</div>
	</div>
	<div class="layui-layout layui-layout-admin layui-anim layui-anim-fadein" style="display: none" id="layout-content">
		<div class="layui-header main-layui-header">
			<ul class="layui-nav layui-layout-left">
		      <li class="layui-nav-item" lay-unselect><a id="sideMenuBar" class="iconfont icon-menu-hide"></a></li>
		      <li class="layui-nav-item" lay-unselect><a class="iconfont icon-home" data-render=""></a></li>
		      <li class="layui-nav-item" lay-unselect><a id="mainRefresh" class="iconfont icon-refresh"></a></li>
		    </ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item" >
					<a href="javascript:;">管理员</a>
					<dl class="layui-nav-child">
						<dd>
							<a data-render="baseInfo">基本资料</a>
						</dd>
						<dd>
							<a href="#">安全设置</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item" lay-unselect><a href="javascript:;" id="logout"><i class="iconfont icon-logout"></i></a></li>
			</ul>
		</div>
		
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<div class="layui-logo" lay-href="home/console.html">
		            <span class="big-logo">单页面模板</span>
		            <span class="simle-logo">单</span>
		           </div>
				<ul class="layui-nav layui-nav-tree" id="admin-side-menu" lay-filter="admin-side-nav" lay-shrink="all">
					<li class="layui-nav-item layui-nav-itemed"><a class="" href="javascript:;"><i class="iconfont">&#xe6a2;</i>&nbsp;<cite>演示</cite></a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;" data-render="/demo/table/"><cite>表格</cite></a>
							</dd>
							<dd>
								<a href="javascript:;" data-render="/demo/form/"><cite>表单</cite></a>
							</dd>
							<dd>
								<a href="javascript:;" data-render="/demo/feedback/"><cite>反馈</cite></a>
							</dd>
						</dl>
						</dl>
					</li>
					<li class="layui-nav-item"><a class="" href="javascript:;"><i class="iconfont">&#xe64c;</i>&nbsp;<cite>系统设置</cite></a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;" data-render="/sys/info/"><cite>系统状态</cite></a>
							</dd>
							<dd>
								<a href="javascript:;" data-render="/sys/loginLog/"><cite>登录日志</cite></a>
							</dd>
						</dl>
					</li>
				</ul>
			</div>
		</div>
		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div class="layui-fluid" id="main-layout"></div>
		</div>
		
		<!-- <div class="layui-footer">
			© 底部固定区域
		</div> -->
	</div>
</body>
<script src="/plugins/layui/layui.js"></script>
<script>
	layui.config({
		base : '/res/js/'
	}).use(["main",'ajax', 'admin', 'conf'], function(){
		var $ = layui.jquery;
		var ajax = layui.ajax;
		var admin = layui.admin;
		var conf = layui.conf;
		ajax.get("/admin", null, {
			showTip:false,
			ok : function(resp){
				$(".loading-layout").fadeOut(function(){
					$(".loading-layout").remove();
				});
				$(".layui-layout").show();
			},
			fail : function(resp){
				location.href = conf.loginUrl;
			}
			 
		});
		
		$("#logout").click(function(){
			layui.msg.confirm("确定退出吗？", function(){
				ajax.get("/admin/logout", null, {
					showTip: false,
					always : function(){
						ajax.setToken("");
						location.href = conf.loginUrl;
					}
				})
			})
		})
		
	})
</script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1273734385'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php%3Fid%3D1273734385' type='text/javascript'%3E%3C/script%3E"));</script>
</html>
